//
//  SPic1TableViewCell.m
//  News
//
//  Created by dlios on 15-5-15.
//  Copyright (c) 2015年 PEAK. All rights reserved.
//

#import "SPic1TableViewCell.h"

@implementation SPic1TableViewCell
- (void)dealloc
{
    [_img release];
    [_img1 release];
    [_lable release];
    [_lable1 release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.img = [[UIImageView alloc] init];
//        _img.image = [UIImage imageNamed:@"yinji"];
        [self.contentView addSubview:_img];
        [_img release];
        
        self.img1 = [[UIImageView alloc] init];
        _img1.image = [UIImage imageNamed:@"iconfont-tupian"];
        [self.contentView addSubview:_img1];
        [_img1 release];
        
        self.lable  = [[UILabel alloc] init];
//        _lable.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_lable];
        [_lable release];
        
        self.lable1 = [[UILabel alloc] init];
        [self.contentView addSubview:_lable1];
        
        [_lable1 release];
        
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _img.frame = CGRectMake(10, 10, [UIScreen mainScreen].bounds.size.width - 20, [UIScreen mainScreen].bounds.size.height / 3);
    
    _img1.frame = CGRectMake(10,[UIScreen mainScreen].bounds.size.height / 2.57, 20, 20);
    
    _lable.frame =CGRectMake(10, [UIScreen mainScreen].bounds.size.height / 2.8 , [UIScreen mainScreen].bounds.size.width , 20);
    
    _lable1.frame =CGRectMake(40, [UIScreen mainScreen].bounds.size.height / 2.57, 20, 20);
}
-(void)setPic:(SPic *)Pic
{
    if (_Pic != Pic) {
        [_Pic release];
        _Pic = [Pic retain];
    }


        _lable.text = Pic.setname;
    _lable1.text = Pic.imgsum;
    
   
    
    
    [_img sd_setImageWithURL:[NSURL URLWithString:Pic.pics[1]]placeholderImage:[UIImage imageNamed:@"``_3(NZ4U{L@4L7FN0J70DA"]];
    
}
- (void)awakeFromNib {
    // Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
